<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>添加字典</title>
    <link href="<%=path%>/css/core.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/form.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/Upload.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/UsersSelect.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/xWindowPanel.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/xToolbar.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>
    <form name="departmentForm" id="departmentForm" action="<%=path%>/system/department/update.t4m" class="form" method="post">
      <s:hidden name="department.id"/>
      <div class="form-group">基本信息</div>
      <table class="form-table" cellspacing="0" cellpadding="0">
        <tr>
          <td class="form-left"><span class="form-required">*</span>部门名称</td>
          <td class="form-right"><s:textfield id="deptName" name="department.name" cssClass="text" theme="simple"/></td>
        </tr>
        <tr>
          <td class="form-left"><span class="form-required">*</span>负责人</td>
          <td class="form-right"><input type="hidden" id="managerId" name="department.manager.id" value="<s:property value="department.manager.id"/>"/></td>
        </tr>
        <tr>
          <td class="form-left">上级部门</td>
          <td class="form-right"><s:select name="department.superId" list="departmentList" listKey="id" listValue="name" headerKey="%{@org.team4.constants.StringConstant@ROOT_ID}" headerValue="请选择" theme="simple"/></td>
        </tr>
        <tr>
          <td class="form-left">是否库房</td>
          <td class="form-right"><input type="checkbox" name="department.isStore" value="T" <s:if test="department.isStore == @org.team4.constants.StringConstant@TRUE">checked="checked"</s:if>/></td>
        </tr>
        <tr>
          <td class="form-left">说明</td>
          <td class="form-right"><s:textarea cssStyle="width:200px; height:70px;" cssClass="textarea" id="deptRemark" name="department.remark" theme="simple"/></td>
        </tr>
      </table>
      <s:hidden name="tabId"/>
      <s:hidden name="windowPanelId"/>
    </form>
    
    <script src="<%=path%>/js/tinyMCE/tiny_mce.js" type="text/javascript"></script>
    <script src="<%=path%>/js/jquery.js" type="text/javascript"></script>
    <script src="<%=path%>/js/core.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Upload.js" type="text/javascript"></script>
    <script src="<%=path%>/js/share.js" type="text/javascript"></script>
    <script src="<%=path%>/js/UsersSelect.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xWindowPanel.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Draggable.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xToolbar.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xToolbar.items.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Validate.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        new UsersSelect({
            url : '<%=path%>/system/ajax/listUsersByCondition.t4m',
            inputId : 'managerId',
            title : '选择收件人',
            width : 516,
            multiple : true,
            selected : $('#managerId').val()
          });
      addValidate('deptName', [{type:'canNull', value:'F', message:'必须填写部门名称'}]);
    });
    </script>
  </body>
</html>